//
//  AddressModel.m
//  JiuLe
//
//  Created by SunChao on 16/10/24.
//  Copyright © 2016年 Fine. All rights reserved.
//

#import "AddressModel.h"

@implementation AddressModel
-(instancetype)initWithDict:(NSDictionary *)dict{
    if (self=[super init]) {
        self.address=dict[@"address"];
        self.city=dict[@"city"];
        self.country=dict[@"country"];
        self.uid=dict[@"id"];
        self.district =dict[@"district"];
        self.isdelete = dict[@"isdelete"];
        self.main = dict[@"main"];
        self.mid = dict[@"mid"];
        self.name = dict[@"name"];
        self.province = dict[@"province"];
        self.tel = dict[@"tel"];
        self.zipcode = dict[@"zipcode"];
        self.location = dict[@"location"];
    }
    return self;
}
+(instancetype) appWithDict:(NSDictionary *)dict{
    
    // 为何使用self，谁调用self方法 self就会指向谁！！
    return [[self alloc] initWithDict:dict];
    
}
@end
